import axios from 'axios'

axios.defaults.baseURL= 'http://localhost:7002'

//请求头
axios.interceptors.request.use(req =>{
  req.headers.authorization = localStorage.getItem('token')
  return req
})

//响应头
axios.interceptors.response.use(res =>{
  return res.data
})

export default axios